package com.qnzw.zjmy.home.ui.adapter;

import android.content.Context;

import com.qnzw.zjmy.R;
import com.qnzw.zjmy.home.ui.model.statistics.RankingList;
import com.qnzw.zjmy.refresh.baseadapter.CommonAdapter;
import com.qnzw.zjmy.refresh.baseadapter.ViewHolder;

import java.util.List;

public class TheChartsAdapter extends CommonAdapter<RankingList> {
    public TheChartsAdapter(Context context, List<RankingList> data, int layoutItemId) {
        super(context, layoutItemId, data);
    }

    @Override
    protected void convert(ViewHolder holder, RankingList rankingList, int position) {
        if (position % 2 != 0) {
            holder.setBackgroundColor(R.id.ll_invite_record, this.mContext.getResources().getColor(R.color.transparent_home));
        }else{
            holder.setBackgroundColor(R.id.ll_invite_record, this.mContext.getResources().getColor(R.color.white_hui));
        }
        holder.setText(R.id.tv_id, rankingList.getIndex());
        holder.setText(R.id.tv_user_name, rankingList.getId());
        holder.setText(R.id.tv_time, rankingList.getMoney());
    }
}
